bin=httpserver
cgi=test_cgi 
cc=g++
LD_FLAGS= -std=c++11 -lpthread
curr=$(shell pwd)
src=main.cc 

ALL:$(bin) $(cgi)
.PHONY:ALL

$(bin):$(src)
	$(cc) -o $@ $^ $(LD_FLAGS)

# $(cgi):$(curr)/cgi/test_cgi.cc 
$(cgi):cgi/test_cgi.cc 
	$(cc) -o $@ $^ -std=c++11

.PHONY:clean
clean:
	rm $(bin)  $(cgi)
	rm -rf output 

.PHONY:output   #发布 
output:
	mkdir -p output 
	cp $(bin) output 
	cp -r wwwroot output 
	cp $(cgi) output/wwwroot


#
#
#test:test.cc
#	g++ test.cc -o test 
#
#
#.PHONY:clean 
#clean:
#	rm -rf test 
